#ifndef KEYBOARD_H
#define KEYBOARD_H

#include <QVariant>
#include <QButtonGroup>
#include <QDialog>
#include <QFrame>
#include <QGridLayout>
#include <QHeaderView>
#include <QLabel>
#include <QPushButton>
#include <QWidget>
#include <QApplication>
#include <QLineEdit>

class KeyBoard : public QDialog
{
    Q_OBJECT
public:
public:
    explicit KeyBoard(int width,int high,int controlType,int inputType, int KeyBdType,QWidget *parent = 0);
    ~KeyBoard();
    QString m_outputStr;
    int     m_type;
    int     m_KeyBdType;

protected:
    QString FindChinese(QString PinYin);
    void    SetHanziBt();
signals:
    void SendData(const int ,const QString&);
private slots:
    void CapsBtnClicked();
    void NumsBtnClicked(QAbstractButton *bt);
    void CarBtnClicked(QAbstractButton *bt);
    void HanziBtnClicked(QAbstractButton *bt);

    void ZHusBtnClicked();
    void ShowNumKeyBdBtnClicked();
    void ShowEnKeyBdBtnClicked();
    void DelBtnClicked();
    void NextBtnClicked();
    void PrevBtnClicked();
    void CloseBtnClicked();
    void SpaceBtnClicked();

private:
    bool m_isCap; // 大小写控制

    QList<QAbstractButton *> m_carList;
    QList<QAbstractButton *> m_zhList;

    QStringList m_zikuList; // 字库一行一行分割

    int m_pageAll; // 总页数
    int m_curPage; // 当前页
    QStringList m_pageList; // 查找出的字符串10个10个分割

    QLineEdit *m_lineEdit;
    int         m_inputType;

    void Loadziku(); // 加载中文字库
private:
    QPushButton *prevBt;
    QPushButton *nextBt;
    QPushButton *delBt;
    QPushButton *underlineBt;
    QPushButton *ObliqueBt;
    QPushButton *ColonBt;
    QPushButton *PercBt;
    QPushButton *starBt;
    QPushButton *andBt;
    QPushButton *addBt;
    QPushButton *SubBt;
    QPushButton *EnKeyBt;
    QPushButton *ExclBt;
    QPushButton *zh_1_Bt;
    QPushButton *zh_2_Bt;
    QPushButton *zh_3_Bt;
    QPushButton *zh_4_Bt;
    QPushButton *zh_5_Bt;
    QPushButton *zh_6_Bt;
    QPushButton *zh_7_Bt;
    QPushButton *zh_8_Bt;
    QPushButton *q_Bt;
    QPushButton *w_Bt;
    QPushButton *e_Bt;
    QPushButton *r_Bt;
    QPushButton *t_Bt;
    QPushButton *y_Bt;
    QPushButton *u_Bt;
    QPushButton *i_Bt;
    QPushButton *o_Bt;
    QPushButton *p_Bt;
    QPushButton *caps_Bt;
    QPushButton *a_Bt;
    QPushButton *s_Bt;
    QPushButton *d_Bt;
    QPushButton *f_Bt;
    QPushButton *g_Bt;
    QPushButton *h_Bt;
    QPushButton *j_Bt;
    QPushButton *k_Bt;
    QPushButton *l_Bt;
    QPushButton *zh_us_Bt;
    QPushButton *NumKey;
    QPushButton *z_Bt;
    QPushButton *x_Bt;
    QPushButton *c_Bt;
    QPushButton *v_Bt;
    QPushButton *b_Bt;
    QPushButton *n_Bt;
    QPushButton *m_Bt;
    QPushButton *spaceBt;
    QLabel *showLb;
    QLabel *langLb;
    QPushButton *num_2_Bt;
    QPushButton *num_1_Bt;
    QPushButton *num_9_Bt;
    QPushButton *num_3_Bt;
    QPushButton *num_6_Bt;
    QPushButton *num_5_Bt;
    QPushButton *num_8_Bt;
    QPushButton *num_7_Bt;
    QPushButton *num_0_Bt;
    QPushButton *num_4_Bt;
    QPushButton *num_point_Bt;
    QPushButton *closeBt;
    QWidget *layoutWidget1;
    QWidget *layoutWidget;

    void setupUi(QDialog *KeyBoard,int width,int high,int inputType)
    {
        if (KeyBoard->objectName().isEmpty())
            KeyBoard->setObjectName(QStringLiteral("KeyBoard"));
        KeyBoard->setEnabled(true);
        QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
        sizePolicy.setHorizontalStretch(0);
        sizePolicy.setVerticalStretch(0);
        sizePolicy.setHeightForWidth(KeyBoard->sizePolicy().hasHeightForWidth());
        KeyBoard->setSizePolicy(sizePolicy);

        QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Preferred);
        sizePolicy1.setHorizontalStretch(0);
        sizePolicy1.setVerticalStretch(0);
//        QFrame *line = new QFrame(KeyBoard);
//        line->setObjectName(QStringLiteral("line"));
//        line->setGeometry(QRect(width*0.8-2, 2, 1, high-2));
//        sizePolicy1.setHeightForWidth(line->sizePolicy().hasHeightForWidth());
//        line->setSizePolicy(sizePolicy1);
//        line->setMinimumSize(QSize(1, high-2));
//        line->setStyleSheet(QStringLiteral("background-color: rgb(170, 0, 0);"));
//        line->setFrameShape(QFrame::VLine);
//        line->setFrameShadow(QFrame::Sunken);
        QFrame *line_2 = new QFrame(KeyBoard);
        line_2->setObjectName(QStringLiteral("line_2"));
        line_2->setGeometry(QRect(2, 1, width-4, 3));
        line_2->setStyleSheet(QStringLiteral("background-color: rgb(170, 0, 0);"));
        line_2->setFrameShape(QFrame::HLine);
        line_2->setFrameShadow(QFrame::Sunken);
        QFrame *line_3 = new QFrame(KeyBoard);
        line_3->setObjectName(QStringLiteral("line_3"));
        line_3->setGeometry(QRect(2, high-4, width-4, 3));
        line_3->setStyleSheet(QStringLiteral("background-color: rgb(170, 0, 0);"));
        line_3->setFrameShape(QFrame::HLine);
        line_3->setFrameShadow(QFrame::Sunken);
        QFrame *line_4 = new QFrame(KeyBoard);
        line_4->setObjectName(QStringLiteral("line_4"));
        line_4->setGeometry(QRect(width-4, 2, 3, high-4));
        line_4->setStyleSheet(QStringLiteral("background-color: rgb(170, 0, 0);"));
        line_4->setFrameShape(QFrame::VLine);
        line_4->setFrameShadow(QFrame::Sunken);
        QFrame *line_5 = new QFrame(KeyBoard);
        line_5->setObjectName(QStringLiteral("line_5"));
        line_5->setGeometry(QRect(2, 2, 3, high-4));
        line_5->setStyleSheet(QStringLiteral("background-color: rgb(170, 0, 0);"));
        line_5->setFrameShape(QFrame::VLine);
        line_5->setFrameShadow(QFrame::Sunken);

        QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred);
        sizePolicy2.setHorizontalStretch(0);
        sizePolicy2.setVerticalStretch(0);

        QVBoxLayout *vBoxMain = new QVBoxLayout(KeyBoard);
        QWidget *FunctionUI = new QWidget(KeyBoard);
        FunctionUI->setObjectName(QStringLiteral("FunctionUI"));
        FunctionUI->setFixedSize(width-13, high*0.15-8);
        QHBoxLayout *hBox = new QHBoxLayout(FunctionUI);
        hBox->setAlignment(Qt::AlignLeft);
        langLb = new QLabel(FunctionUI);
        langLb->setFont(QFont("仿宋",17));
        langLb->setObjectName(QStringLiteral("langLb"));
        langLb->setAlignment(Qt::AlignCenter);
        hBox->addWidget(langLb);
        hBox->addSpacing(15);
        showLb = new QLabel(FunctionUI);
        showLb->setFont(QFont("仿宋",15));
        showLb->setObjectName(QStringLiteral("showLb"));
        showLb->setStyleSheet(QStringLiteral(""));
        showLb->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
        hBox->addWidget(showLb);

        m_lineEdit = new QLineEdit(FunctionUI);
        if(inputType == 1)
            m_lineEdit->setEchoMode(QLineEdit::Password);
        if(inputType == 2)
        {
            QRegExp Iprx("\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b");
            QRegExpValidator *IPValidator = new QRegExpValidator(Iprx, this);
            m_lineEdit->setValidator(IPValidator);
//            m_lineEdit->setInputMask("000.000.000.000;_");
        }
        m_lineEdit->setFont(QFont("仿宋",14));
        m_lineEdit->setObjectName(QStringLiteral("lineEdit"));
        m_lineEdit->setAlignment(Qt::AlignCenter);
        hBox->addWidget(m_lineEdit);

        delBt = new QPushButton(FunctionUI);
        delBt->setObjectName(QStringLiteral("delBt"));
        delBt->setFixedSize(64,high*0.15-16);
        delBt->setFont(QFont("仿宋",14));
        connect(delBt,&QPushButton::clicked,this,&KeyBoard::DelBtnClicked);
        hBox->addWidget(delBt);

        closeBt = new QPushButton(FunctionUI);
        closeBt->setObjectName(QStringLiteral("closeBt"));
        closeBt->setFixedSize(64,high*0.15-16);
        connect(closeBt,&QPushButton::clicked,this,&KeyBoard::CloseBtnClicked);
        hBox->addWidget(closeBt);

        vBoxMain->addWidget(FunctionUI);

        QHBoxLayout *hBox1 = new QHBoxLayout();
        vBoxMain->addLayout(hBox1);

        layoutWidget = new QWidget(KeyBoard);
        hBox1->addWidget(layoutWidget);
        layoutWidget->setObjectName(QStringLiteral("layoutWidget"));
        layoutWidget->setGeometry(QRect(4, 4, width-13, high*0.85-8));
        QGridLayout *gridLayout_2 = new QGridLayout(layoutWidget);
        gridLayout_2->setSpacing(3);
        gridLayout_2->setContentsMargins(8, 8, 8, 8);
        gridLayout_2->setObjectName(QStringLiteral("gridLayout_2"));
        gridLayout_2->setContentsMargins(0, 0, 0, 0);

        zh_1_Bt = new QPushButton(layoutWidget);
        zh_1_Bt->setObjectName(QStringLiteral("zh_1_Bt"));
        sizePolicy2.setHeightForWidth(zh_1_Bt->sizePolicy().hasHeightForWidth());
        zh_1_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(zh_1_Bt, 0, 0, 1, 1);

        zh_2_Bt = new QPushButton(layoutWidget);
        zh_2_Bt->setObjectName(QStringLiteral("zh_2_Bt"));
        sizePolicy2.setHeightForWidth(zh_2_Bt->sizePolicy().hasHeightForWidth());
        zh_2_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(zh_2_Bt, 0, 1, 1, 1);

        zh_3_Bt = new QPushButton(layoutWidget);
        zh_3_Bt->setObjectName(QStringLiteral("zh_3_Bt"));
        sizePolicy2.setHeightForWidth(zh_3_Bt->sizePolicy().hasHeightForWidth());

        zh_3_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(zh_3_Bt, 0, 2, 1, 1);

        zh_4_Bt = new QPushButton(layoutWidget);
        zh_4_Bt->setObjectName(QStringLiteral("zh_4_Bt"));
        sizePolicy2.setHeightForWidth(zh_4_Bt->sizePolicy().hasHeightForWidth());
        zh_4_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(zh_4_Bt, 0, 3, 1, 1);

        zh_5_Bt = new QPushButton(layoutWidget);
        zh_5_Bt->setObjectName(QStringLiteral("zh_5_Bt"));
        sizePolicy2.setHeightForWidth(zh_5_Bt->sizePolicy().hasHeightForWidth());
        zh_5_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(zh_5_Bt, 0, 4, 1, 1);

        zh_6_Bt = new QPushButton(layoutWidget);
        zh_6_Bt->setObjectName(QStringLiteral("zh_6_Bt"));
        sizePolicy2.setHeightForWidth(zh_6_Bt->sizePolicy().hasHeightForWidth());
        zh_6_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(zh_6_Bt, 0, 5, 1, 1);

        zh_7_Bt = new QPushButton(layoutWidget);
        zh_7_Bt->setObjectName(QStringLiteral("zh_7_Bt"));
        sizePolicy2.setHeightForWidth(zh_7_Bt->sizePolicy().hasHeightForWidth());
        zh_7_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(zh_7_Bt, 0, 6, 1, 1);

        zh_8_Bt = new QPushButton(layoutWidget);
        zh_8_Bt->setObjectName(QStringLiteral("zh_8_Bt"));
        sizePolicy2.setHeightForWidth(zh_8_Bt->sizePolicy().hasHeightForWidth());
        zh_8_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(zh_8_Bt, 0, 7, 1, 1);

        prevBt = new QPushButton(layoutWidget);
        prevBt->setObjectName(QStringLiteral("prevBt"));

        sizePolicy2.setHeightForWidth(prevBt->sizePolicy().hasHeightForWidth());
        prevBt->setSizePolicy(sizePolicy2);
        connect(prevBt,&QPushButton::clicked,this,&KeyBoard::PrevBtnClicked);
        gridLayout_2->addWidget(prevBt, 0, 8, 1, 1);

        nextBt = new QPushButton(layoutWidget);
        nextBt->setObjectName(QStringLiteral("nextBt"));
        sizePolicy2.setHeightForWidth(nextBt->sizePolicy().hasHeightForWidth());
        nextBt->setSizePolicy(sizePolicy2);
        connect(nextBt,&QPushButton::clicked,this,&KeyBoard::NextBtnClicked);
        gridLayout_2->addWidget(nextBt, 0, 9, 1, 1);

        q_Bt = new QPushButton(layoutWidget);
        q_Bt->setObjectName(QStringLiteral("q_Bt"));
        sizePolicy2.setHeightForWidth(q_Bt->sizePolicy().hasHeightForWidth());
        q_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(q_Bt, 1, 0, 1, 1);

        w_Bt = new QPushButton(layoutWidget);
        w_Bt->setObjectName(QStringLiteral("w_Bt"));
        sizePolicy2.setHeightForWidth(w_Bt->sizePolicy().hasHeightForWidth());
        w_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(w_Bt, 1, 1, 1, 1);

        e_Bt = new QPushButton(layoutWidget);
        e_Bt->setObjectName(QStringLiteral("e_Bt"));
        sizePolicy2.setHeightForWidth(e_Bt->sizePolicy().hasHeightForWidth());
        e_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(e_Bt, 1, 2, 1, 1);

        r_Bt = new QPushButton(layoutWidget);
        r_Bt->setObjectName(QStringLiteral("r_Bt"));
        sizePolicy2.setHeightForWidth(r_Bt->sizePolicy().hasHeightForWidth());
        r_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(r_Bt, 1, 3, 1, 1);

        t_Bt = new QPushButton(layoutWidget);
        t_Bt->setObjectName(QStringLiteral("t_Bt"));
        sizePolicy2.setHeightForWidth(t_Bt->sizePolicy().hasHeightForWidth());
        t_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(t_Bt, 1, 4, 1, 1);

        y_Bt = new QPushButton(layoutWidget);
        y_Bt->setObjectName(QStringLiteral("y_Bt"));
        sizePolicy2.setHeightForWidth(y_Bt->sizePolicy().hasHeightForWidth());
        y_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(y_Bt, 1, 5, 1, 1);

        u_Bt = new QPushButton(layoutWidget);
        u_Bt->setObjectName(QStringLiteral("u_Bt"));
        sizePolicy2.setHeightForWidth(u_Bt->sizePolicy().hasHeightForWidth());
        u_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(u_Bt, 1, 6, 1, 1);

        i_Bt = new QPushButton(layoutWidget);
        i_Bt->setObjectName(QStringLiteral("i_Bt"));
        sizePolicy2.setHeightForWidth(i_Bt->sizePolicy().hasHeightForWidth());
        i_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(i_Bt, 1, 7, 1, 1);

        o_Bt = new QPushButton(layoutWidget);
        o_Bt->setObjectName(QStringLiteral("o_Bt"));
        sizePolicy2.setHeightForWidth(o_Bt->sizePolicy().hasHeightForWidth());
        o_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(o_Bt, 1, 8, 1, 1);

        p_Bt = new QPushButton(layoutWidget);
        p_Bt->setObjectName(QStringLiteral("p_Bt"));
        sizePolicy2.setHeightForWidth(p_Bt->sizePolicy().hasHeightForWidth());
        p_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(p_Bt, 1, 9, 1, 1);

        caps_Bt = new QPushButton(layoutWidget);
        caps_Bt->setObjectName(QStringLiteral("caps_Bt"));
        sizePolicy2.setHeightForWidth(caps_Bt->sizePolicy().hasHeightForWidth());
        caps_Bt->setSizePolicy(sizePolicy2);
        connect(caps_Bt,&QPushButton::clicked,this,&KeyBoard::CapsBtnClicked);
        gridLayout_2->addWidget(caps_Bt, 2, 0, 1, 1);

        a_Bt = new QPushButton(layoutWidget);
        a_Bt->setObjectName(QStringLiteral("a_Bt"));
        sizePolicy2.setHeightForWidth(a_Bt->sizePolicy().hasHeightForWidth());
        a_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(a_Bt, 2, 1, 1, 1);

        s_Bt = new QPushButton(layoutWidget);
        s_Bt->setObjectName(QStringLiteral("s_Bt"));
        sizePolicy2.setHeightForWidth(s_Bt->sizePolicy().hasHeightForWidth());
        s_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(s_Bt, 2, 2, 1, 1);

        d_Bt = new QPushButton(layoutWidget);
        d_Bt->setObjectName(QStringLiteral("d_Bt"));
        sizePolicy2.setHeightForWidth(d_Bt->sizePolicy().hasHeightForWidth());
        d_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(d_Bt, 2, 3, 1, 1);

        f_Bt = new QPushButton(layoutWidget);
        f_Bt->setObjectName(QStringLiteral("f_Bt"));
        sizePolicy2.setHeightForWidth(f_Bt->sizePolicy().hasHeightForWidth());
        f_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(f_Bt, 2, 4, 1, 1);

        g_Bt = new QPushButton(layoutWidget);
        g_Bt->setObjectName(QStringLiteral("g_Bt"));
        sizePolicy2.setHeightForWidth(g_Bt->sizePolicy().hasHeightForWidth());
        g_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(g_Bt, 2, 5, 1, 1);

        h_Bt = new QPushButton(layoutWidget);
        h_Bt->setObjectName(QStringLiteral("h_Bt"));
        sizePolicy2.setHeightForWidth(h_Bt->sizePolicy().hasHeightForWidth());
        h_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(h_Bt, 2, 6, 1, 1);

        j_Bt = new QPushButton(layoutWidget);
        j_Bt->setObjectName(QStringLiteral("j_Bt"));
        sizePolicy2.setHeightForWidth(j_Bt->sizePolicy().hasHeightForWidth());
        j_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(j_Bt, 2, 7, 1, 1);

        k_Bt = new QPushButton(layoutWidget);
        k_Bt->setObjectName(QStringLiteral("k_Bt"));
        sizePolicy2.setHeightForWidth(k_Bt->sizePolicy().hasHeightForWidth());
        k_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(k_Bt, 2, 8, 1, 1);

        l_Bt = new QPushButton(layoutWidget);
        l_Bt->setObjectName(QStringLiteral("l_Bt"));
        sizePolicy2.setHeightForWidth(l_Bt->sizePolicy().hasHeightForWidth());
        l_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(l_Bt, 2, 9, 1, 1);

        zh_us_Bt = new QPushButton(layoutWidget);
        zh_us_Bt->setObjectName(QStringLiteral("zh_us_Bt"));
        sizePolicy2.setHeightForWidth(zh_us_Bt->sizePolicy().hasHeightForWidth());
        zh_us_Bt->setSizePolicy(sizePolicy2);
        connect(zh_us_Bt,&QPushButton::clicked,this,&KeyBoard::ZHusBtnClicked);
        gridLayout_2->addWidget(zh_us_Bt, 3, 0, 1, 1);

        NumKey = new QPushButton(layoutWidget);
        NumKey->setObjectName(QStringLiteral("NumKey"));
        sizePolicy2.setHeightForWidth(NumKey->sizePolicy().hasHeightForWidth());
        NumKey->setSizePolicy(sizePolicy2);
        connect(NumKey,&QPushButton::clicked,this,&KeyBoard::ShowNumKeyBdBtnClicked);
        gridLayout_2->addWidget(NumKey, 3, 1, 1, 1);

        z_Bt = new QPushButton(layoutWidget);
        z_Bt->setObjectName(QStringLiteral("z_Bt"));
        sizePolicy2.setHeightForWidth(z_Bt->sizePolicy().hasHeightForWidth());
        z_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(z_Bt, 3, 2, 1, 1);

        x_Bt = new QPushButton(layoutWidget);
        x_Bt->setObjectName(QStringLiteral("x_Bt"));
        sizePolicy2.setHeightForWidth(x_Bt->sizePolicy().hasHeightForWidth());
        x_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(x_Bt, 3, 3, 1, 1);

        c_Bt = new QPushButton(layoutWidget);
        c_Bt->setObjectName(QStringLiteral("c_Bt"));
        sizePolicy2.setHeightForWidth(c_Bt->sizePolicy().hasHeightForWidth());
        c_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(c_Bt, 3, 4, 1, 1);

        v_Bt = new QPushButton(layoutWidget);
        v_Bt->setObjectName(QStringLiteral("v_Bt"));
        sizePolicy2.setHeightForWidth(v_Bt->sizePolicy().hasHeightForWidth());
        v_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(v_Bt, 3, 5, 1, 1);

        b_Bt = new QPushButton(layoutWidget);
        b_Bt->setObjectName(QStringLiteral("b_Bt"));
        sizePolicy2.setHeightForWidth(b_Bt->sizePolicy().hasHeightForWidth());
        b_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(b_Bt,3, 6, 1, 1);

        n_Bt = new QPushButton(layoutWidget);
        n_Bt->setObjectName(QStringLiteral("n_Bt"));
        sizePolicy2.setHeightForWidth(n_Bt->sizePolicy().hasHeightForWidth());
        n_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(n_Bt, 3, 7, 1, 1);

        m_Bt = new QPushButton(layoutWidget);
        m_Bt->setObjectName(QStringLiteral("m_Bt"));
        sizePolicy2.setHeightForWidth(m_Bt->sizePolicy().hasHeightForWidth());
        m_Bt->setSizePolicy(sizePolicy2);

        gridLayout_2->addWidget(m_Bt, 3, 8, 1, 1);

        spaceBt = new QPushButton(layoutWidget);
        spaceBt->setObjectName(QStringLiteral("spaceBt"));
        sizePolicy2.setHeightForWidth(spaceBt->sizePolicy().hasHeightForWidth());
        spaceBt->setSizePolicy(sizePolicy2);
        connect(spaceBt,&QPushButton::clicked,this,&KeyBoard::SpaceBtnClicked);
        gridLayout_2->addWidget(spaceBt, 3, 9, 1, 1);


        layoutWidget1 = new QWidget(KeyBoard);
        layoutWidget1->setVisible(false);
        hBox1->addWidget(layoutWidget1);
        layoutWidget1->setObjectName(QStringLiteral("layoutWidget1"));
        layoutWidget1->setGeometry(QRect(width*0.8, 4, width-8, high*0.85-8));
        QGridLayout *gridLayout = new QGridLayout(layoutWidget1);
        gridLayout->setSpacing(3);
        gridLayout->setContentsMargins(8, 8, 8, 8);
        gridLayout->setObjectName(QStringLiteral("gridLayout"));
        gridLayout->setContentsMargins(0, 0, 0, 0);

        num_1_Bt = new QPushButton(layoutWidget1);
        num_1_Bt->setObjectName(QStringLiteral("num_1_Bt"));
        sizePolicy2.setHeightForWidth(num_1_Bt->sizePolicy().hasHeightForWidth());
        num_1_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_1_Bt, 0, 0, 1, 1);

        num_2_Bt = new QPushButton(layoutWidget1);
        num_2_Bt->setObjectName(QStringLiteral("num_2_Bt"));
        sizePolicy2.setHeightForWidth(num_2_Bt->sizePolicy().hasHeightForWidth());
        num_2_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_2_Bt, 1, 0, 1, 1);

        num_3_Bt = new QPushButton(layoutWidget1);
        num_3_Bt->setObjectName(QStringLiteral("num_3_Bt"));
        sizePolicy2.setHeightForWidth(num_3_Bt->sizePolicy().hasHeightForWidth());
        num_3_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_3_Bt, 2, 0, 1, 1);

        num_4_Bt = new QPushButton(layoutWidget1);
        num_4_Bt->setObjectName(QStringLiteral("num_4_Bt"));
        sizePolicy2.setHeightForWidth(num_4_Bt->sizePolicy().hasHeightForWidth());
        num_4_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_4_Bt, 0, 1, 1, 1);

        num_5_Bt = new QPushButton(layoutWidget1);
        num_5_Bt->setObjectName(QStringLiteral("num_5_Bt"));
        sizePolicy2.setHeightForWidth(num_5_Bt->sizePolicy().hasHeightForWidth());
        num_5_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_5_Bt, 1, 1, 1, 1);

        num_6_Bt = new QPushButton(layoutWidget1);
        num_6_Bt->setObjectName(QStringLiteral("num_6_Bt"));
        sizePolicy2.setHeightForWidth(num_6_Bt->sizePolicy().hasHeightForWidth());
        num_6_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_6_Bt, 2, 1, 1, 1);

        num_7_Bt = new QPushButton(layoutWidget1);
        num_7_Bt->setObjectName(QStringLiteral("num_7_Bt"));
        sizePolicy2.setHeightForWidth(num_7_Bt->sizePolicy().hasHeightForWidth());
        num_7_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_7_Bt, 0, 2, 1, 1);

        num_8_Bt = new QPushButton(layoutWidget1);
        num_8_Bt->setObjectName(QStringLiteral("num_8_Bt"));
        sizePolicy2.setHeightForWidth(num_8_Bt->sizePolicy().hasHeightForWidth());
        num_8_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_8_Bt, 1, 2, 1, 1);

        num_9_Bt = new QPushButton(layoutWidget1);
        num_9_Bt->setObjectName(QStringLiteral("num_9_Bt"));
        sizePolicy2.setHeightForWidth(num_9_Bt->sizePolicy().hasHeightForWidth());
        num_9_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_9_Bt, 2, 2, 1, 1);

        num_0_Bt = new QPushButton(layoutWidget1);
        num_0_Bt->setObjectName(QStringLiteral("num_0_Bt"));
        sizePolicy2.setHeightForWidth(num_0_Bt->sizePolicy().hasHeightForWidth());
        num_0_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_0_Bt, 0, 3, 1, 1);

        num_point_Bt = new QPushButton(layoutWidget1);
        num_point_Bt->setObjectName(QStringLiteral("num_point_Bt"));
        sizePolicy2.setHeightForWidth(num_point_Bt->sizePolicy().hasHeightForWidth());
        num_point_Bt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(num_point_Bt, 1, 3, 1, 1);

        underlineBt = new QPushButton(layoutWidget1);
        underlineBt->setObjectName(QStringLiteral("underlineBt"));
        sizePolicy2.setHeightForWidth(underlineBt->sizePolicy().hasHeightForWidth());
        underlineBt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(underlineBt, 2, 3, 1, 1);

        starBt = new QPushButton(layoutWidget1);
        starBt->setObjectName(QStringLiteral("starBt"));
        sizePolicy2.setHeightForWidth(starBt->sizePolicy().hasHeightForWidth());
        starBt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(starBt, 0, 4, 1, 1);

        andBt = new QPushButton(layoutWidget1);
        andBt->setObjectName(QStringLiteral("andBt"));
        sizePolicy2.setHeightForWidth(andBt->sizePolicy().hasHeightForWidth());
        andBt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(andBt, 1, 4, 1, 1);

        ObliqueBt = new QPushButton(layoutWidget1);
        ObliqueBt->setObjectName(QStringLiteral("ObliqueBt"));
        sizePolicy2.setHeightForWidth(ObliqueBt->sizePolicy().hasHeightForWidth());
        ObliqueBt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(ObliqueBt, 2, 4, 1, 1);

        ColonBt = new QPushButton(layoutWidget1);
        ColonBt->setObjectName(QStringLiteral("ColonBt"));
        sizePolicy2.setHeightForWidth(ColonBt->sizePolicy().hasHeightForWidth());
        ColonBt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(ColonBt, 0, 5, 1, 1);

        PercBt = new QPushButton(layoutWidget1);
        PercBt->setObjectName(QStringLiteral("PercBt"));
        sizePolicy2.setHeightForWidth(PercBt->sizePolicy().hasHeightForWidth());
        PercBt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(PercBt, 1, 5, 1, 1);

        ExclBt = new QPushButton(layoutWidget1);
        ExclBt->setObjectName(QStringLiteral("ExclBt"));
        sizePolicy2.setHeightForWidth(ExclBt->sizePolicy().hasHeightForWidth());
        ExclBt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(ExclBt, 2, 5, 1, 1);

        addBt = new QPushButton(layoutWidget1);
        addBt->setObjectName(QStringLiteral("addBt"));
        sizePolicy2.setHeightForWidth(addBt->sizePolicy().hasHeightForWidth());
        addBt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(addBt, 0, 6, 1, 1);

        SubBt = new QPushButton(layoutWidget1);
        SubBt->setObjectName(QStringLiteral("SubBt"));
        sizePolicy2.setHeightForWidth(SubBt->sizePolicy().hasHeightForWidth());
        SubBt->setSizePolicy(sizePolicy2);

        gridLayout->addWidget(SubBt, 1, 6, 1, 1);

        EnKeyBt = new QPushButton(layoutWidget1);
        EnKeyBt->setObjectName(QStringLiteral("EnKeyBt"));
        sizePolicy2.setHeightForWidth(EnKeyBt->sizePolicy().hasHeightForWidth());
        EnKeyBt->setSizePolicy(sizePolicy2);
        connect(EnKeyBt,&QPushButton::clicked,this,&KeyBoard::ShowEnKeyBdBtnClicked);
        gridLayout->addWidget(EnKeyBt, 2, 6, 1, 1);

        retranslateUi(KeyBoard);

        //QMetaObject::connectSlotsByName(KeyBoard);
    } // setupUi

    void retranslateUi(QDialog *KeyBoard)
    {
        KeyBoard->setWindowTitle(QApplication::translate("KeyBoard", "Dialog", Q_NULLPTR));
        prevBt->setText(QApplication::translate("KeyBoard", "<", Q_NULLPTR));
        nextBt->setText(QApplication::translate("KeyBoard", ">", Q_NULLPTR));
        delBt->setText(QApplication::translate("KeyBoard", "Del", Q_NULLPTR));
        zh_1_Bt->setText(QString());
        zh_2_Bt->setText(QString());
        zh_3_Bt->setText(QString());
        zh_4_Bt->setText(QString());
        zh_5_Bt->setText(QString());
        zh_6_Bt->setText(QString());
        zh_7_Bt->setText(QString());
        zh_8_Bt->setText(QString());
        underlineBt->setText(QApplication::translate("KeyBoard", "_", Q_NULLPTR));
        starBt->setText(QApplication::translate("KeyBoard", "*", Q_NULLPTR));
        andBt->setText(QApplication::translate("KeyBoard", "#", Q_NULLPTR));
        ObliqueBt->setText(QApplication::translate("KeyBoard", "/", Q_NULLPTR));
        ColonBt->setText(QApplication::translate("KeyBoard", ":", Q_NULLPTR));
        PercBt->setText(QApplication::translate("KeyBoard", "%", Q_NULLPTR));
        addBt->setText(QApplication::translate("KeyBoard", "+", Q_NULLPTR));
        SubBt->setText(QApplication::translate("KeyBoard", "-", Q_NULLPTR));
        ExclBt->setText(QApplication::translate("KeyBoard", "!", Q_NULLPTR));
        EnKeyBt->setText(QApplication::translate("KeyBoard", "abc", Q_NULLPTR));
        q_Bt->setText(QApplication::translate("KeyBoard", "q", Q_NULLPTR));
        w_Bt->setText(QApplication::translate("KeyBoard", "w", Q_NULLPTR));
        e_Bt->setText(QApplication::translate("KeyBoard", "e", Q_NULLPTR));
        r_Bt->setText(QApplication::translate("KeyBoard", "r", Q_NULLPTR));
        t_Bt->setText(QApplication::translate("KeyBoard", "t", Q_NULLPTR));
        y_Bt->setText(QApplication::translate("KeyBoard", "y", Q_NULLPTR));
        u_Bt->setText(QApplication::translate("KeyBoard", "u", Q_NULLPTR));
        i_Bt->setText(QApplication::translate("KeyBoard", "i", Q_NULLPTR));
        o_Bt->setText(QApplication::translate("KeyBoard", "o", Q_NULLPTR));
        p_Bt->setText(QApplication::translate("KeyBoard", "p", Q_NULLPTR));
        caps_Bt->setText(QApplication::translate("KeyBoard", "Caps", Q_NULLPTR));
        a_Bt->setText(QApplication::translate("KeyBoard", "a", Q_NULLPTR));
        s_Bt->setText(QApplication::translate("KeyBoard", "s", Q_NULLPTR));
        d_Bt->setText(QApplication::translate("KeyBoard", "d", Q_NULLPTR));
        f_Bt->setText(QApplication::translate("KeyBoard", "f", Q_NULLPTR));
        g_Bt->setText(QApplication::translate("KeyBoard", "g", Q_NULLPTR));
        h_Bt->setText(QApplication::translate("KeyBoard", "h", Q_NULLPTR));
        j_Bt->setText(QApplication::translate("KeyBoard", "j", Q_NULLPTR));
        k_Bt->setText(QApplication::translate("KeyBoard", "k", Q_NULLPTR));
        l_Bt->setText(QApplication::translate("KeyBoard", "l", Q_NULLPTR));
        zh_us_Bt->setText(QApplication::translate("KeyBoard", "\344\270\255/\350\213\261", Q_NULLPTR));
        NumKey->setText(QApplication::translate("KeyBoard", "123", Q_NULLPTR));
        z_Bt->setText(QApplication::translate("KeyBoard", "z", Q_NULLPTR));
        x_Bt->setText(QApplication::translate("KeyBoard", "x", Q_NULLPTR));
        c_Bt->setText(QApplication::translate("KeyBoard", "c", Q_NULLPTR));
        v_Bt->setText(QApplication::translate("KeyBoard", "v", Q_NULLPTR));
        b_Bt->setText(QApplication::translate("KeyBoard", "b", Q_NULLPTR));
        n_Bt->setText(QApplication::translate("KeyBoard", "n", Q_NULLPTR));
        m_Bt->setText(QApplication::translate("KeyBoard", "m", Q_NULLPTR));
        spaceBt->setText(QApplication::translate("KeyBoard", "space", Q_NULLPTR));
        showLb->setText(QString());
        langLb->setText(QApplication::translate("KeyBoard", "\350\213\261\346\226\207", Q_NULLPTR));
        num_2_Bt->setText(QApplication::translate("KeyBoard", "2", Q_NULLPTR));
        num_1_Bt->setText(QApplication::translate("KeyBoard", "1", Q_NULLPTR));
        num_9_Bt->setText(QApplication::translate("KeyBoard", "9", Q_NULLPTR));
        num_3_Bt->setText(QApplication::translate("KeyBoard", "3", Q_NULLPTR));
        num_6_Bt->setText(QApplication::translate("KeyBoard", "6", Q_NULLPTR));
        num_5_Bt->setText(QApplication::translate("KeyBoard", "5", Q_NULLPTR));
        num_8_Bt->setText(QApplication::translate("KeyBoard", "8", Q_NULLPTR));
        num_7_Bt->setText(QApplication::translate("KeyBoard", "7", Q_NULLPTR));
        num_0_Bt->setText(QApplication::translate("KeyBoard", "0", Q_NULLPTR));
        num_4_Bt->setText(QApplication::translate("KeyBoard", "4", Q_NULLPTR));
        num_point_Bt->setText(QApplication::translate("KeyBoard", ".", Q_NULLPTR));
        closeBt->setText(QApplication::translate("KeyBoard", "\357\271\200", Q_NULLPTR));
    } // retranslateUi
};

#endif // KEYBOARD_H
